import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;



public class Test {
    public static void main(String[] args) {
        Queue <Integer> queue = new LinkedList<>();
    }
}

/*
//有效的括号
class Solution {
    public boolean isValid(String s) {
        Stack <Character> stack =new  Stack <>();
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if (ch == '(' || ch == '{' || ch == '[') {
                stack.push(ch);
            }else {
                if (stack.empty()) {
                    return  false;
                }
                char ch2 = stack.peek();
                if (ch2 =='(' &&ch == ')' || ch2 =='{' &&ch == '}' ||ch2 =='[' &&ch == ']') {
                    stack.pop();
                }else {
                return false;
                }
            }
        }
        if (!stack.empty()) {
            return  false;
        }
        return true;
    }
}*/
// 栈的压入、弹出序列
/*
public class Solution {

    public boolean IsPopOrder (int[] pushV, int[] popV) {
        Stack <Integer> stack = new Stack<>();
        int j = 0;
        for (int i = 0; i < pushV.length; i++) {
                stack.push(pushV[i]);
           while (!stack.empty() && j<popV.length && stack.peek()==popV[j]){
               stack.pop();
               j++;
           }
        }
       return stack.empty();
    }
}*/
/*
public class Solution {
    public boolean IsPopOrder (int[] pushV, int[] popV) {
        Stack <Integer> stack = new Stack<>();
        int j = 0;
        for (int i = 0; i < pushV.length; i++) {
            stack.push(pushV[i]);
            while(j < popV.length) {
                if(stack.empty()){
                    break;
                }
                if (popV[j] == stack.peek()) {
                    stack.pop();
                    j++;
                } else {
                    break;
                }
            }
        }
        return stack.empty();
    }
}*/
//最小栈
/*
class MinStack {
    private  Stack <Integer> stack;
    private  Stack <Integer> minstack;
    public MinStack() {
        this.stack = new Stack<>();
        this.minstack = new Stack<>();
    }

    public void push(int val) {
        stack.push(val);
        if (minstack.empty() || val <= minstack.peek()) {
            minstack.push(val);
        }
    }

    public void pop() {
        int val = stack.pop();
        if (!minstack.empty() && val == minstack.peek()) {
            minstack.pop();
        }
    }

    public int top() {
        return stack.peek();
    }

    public int getMin() {
        if (!minstack.empty()) {
            return minstack.peek();
        }
        return -1;
    }
}
*/
